import logging
import yaml
import yagmail


#封装邮箱
def set_qq(filen):
    mali=yagmail.SMTP(user='1006142636@qq.com',password='mduzpggkpknubgac',host='smtp.qq.com')
    mali.send(to='1006142636@qq.com',subject='综合服务平台接口测试报告',contents='月考',attachments=filen)

#封装日志
def set_log():
    logging.basicConfig(filename='./log/de.bug',filemode='a+',format='%(filename)s ->%(levelno)s ->%(message)s',level=logging.DEBUG)

#读取yaml文件
def set_finame(finame):
    with open(finame,'r',encoding='utf-8')as e:
        return yaml.safe_load(e)

    
